<template>
  <div>
    <div class="tabs_table_panel">
      <el-tabs
        v-model="activeName"
        @tab-click="handleClick"
        class="elementstyle"
      >
        <el-tab-pane label="紧急处理" name="first">
          <div id="queryTable" style="clear: both;">
            <div id="tableData">
              <el-table :data="tableData" style="width: 100%" border>
                <!-- <el-table-column type="selection" width="55" align="center" />-->

                <el-table-column
                  prop="emeTreName"
                  label="名称"
                  width="120"
                  align="center"
                />
                <el-table-column
                  prop="emeTreDescribe"
                  label="描述"
                  align="center"
                />
                <el-table-column
                  prop="emeTreState"
                  label="状态"
                  width="120"
                  align="center"
                />
                <el-table-column label="操作" align="center" width="120">
                  <template slot-scope="scope">
                    <div>
                      <el-button
                        type="text"
                        @click="theecho1(scope.row.emeTreId)"
                        >修改</el-button
                      >
                      <el-popconfirm
                        @onConfirm="removethebaseline2(scope.row.emeTreId)"
                        title="删除后无法恢复，请确定是否删除？"
                        ><el-button slot="reference" type="text"
                          >删除</el-button
                        >
                      </el-popconfirm>
                    </div>
                  </template>
                </el-table-column>
              </el-table>
              <el-pagination
                background
                :current-page.sync="pageNum1"
                :page-sizes="pageSizes1"
                layout="total,prev, pager, next,sizes"
                :total="total"
                @size-change="changeSize1"
                @current-change="changePage1"
              ></el-pagination>
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane label="运动处方" name="second">
          <div id="queryTable" style="clear: both;">
            <div>
              <el-table :data="tableData" style="width: 100%" border>
                <el-table-column
                  prop="exePreName"
                  label="名称"
                  width="120"
                  align="center"
                />
                <el-table-column
                  prop="exePreDescribe"
                  label="描述"
                  align="center"
                />
                <el-table-column
                  prop="exePreState"
                  label="状态"
                  width="120"
                  align="center"
                />
                <el-table-column label="操作" align="center" width="120">
                  <template slot-scope="scope">
                    <div>
                      <el-button
                        type="text"
                        @click="theecho2(scope.row.exePreId)"
                        >修改</el-button
                      >

                      <el-popconfirm
                        @onConfirm="removethebaseline1(scope.row.exePreId)"
                        title="删除后无法恢复，请确定是否删除？"
                        ><el-button slot="reference" type="text"
                          >删除</el-button
                        >
                      </el-popconfirm>
                    </div>
                  </template>
                </el-table-column>
              </el-table>
              <el-pagination
                background
                :current-page.sync="pageNum2"
                :page-sizes="pageSizes2"
                layout="total,prev, pager, next,sizes"
                :total="total"
                @size-change="changeSize2"
                @current-change="changePage2"
              ></el-pagination>
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane label="饮食处方" name="third">
          <div id="queryTable" style="clear: both;">
            <div id="tableData">
              <el-table :data="tableData" style="width: 100%" border>
                <el-table-column
                  prop="diePreName"
                  label="名称"
                  width="120"
                  align="center"
                />
                <el-table-column
                  prop="diePreDescribe"
                  label="描述"
                  align="center"
                />
                <el-table-column
                  prop="diePreState"
                  label="状态"
                  width="120"
                  align="center"
                />
                <el-table-column label="操作" align="center" width="120">
                  <template slot-scope="scope">
                    <div>
                      <el-button
                        type="text"
                        @click="theecho3(scope.row.diePreId)"
                        >修改</el-button
                      >
                      <el-popconfirm
                        @onConfirm="removethebaseline3(scope.row.diePreId)"
                        title="删除后无法恢复，请确定是否删除？"
                        ><el-button slot="reference" type="text"
                          >删除</el-button
                        >
                      </el-popconfirm>
                    </div>
                  </template>
                </el-table-column>
              </el-table>
              <el-pagination
                background
                :current-page.sync="pageNum3"
                :page-sizes="pageSizes3"
                layout="total,prev, pager, next,sizes"
                :total="total"
                @size-change="changeSize3"
                @current-change="changePage3"
              ></el-pagination>
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane label="风险评估" name="fourth">
<!-- <follow-up-questionnaire></follow-up-questionnaire> -->
          <div id="queryTable" style="clear: both;">
            <div id="tableData">
              <el-table :data="tableData" style="width: 100%" border>
                <el-table-column
                  prop="risAssName"
                  label="名称"
                  width="120"
                  align="center"
                />
                <el-table-column
                  prop="risAssSources"
                  label="评估来源"
                  align="center"
                />
               
                <el-table-column label="操作" align="center" width="120">
                  <template slot-scope="scope">
                    <div>
                      <el-button
                        type="text"
                        @click="theecho4(scope.row.risAssId)"
                        >修改</el-button
                      >
                      <el-popconfirm
                        @onConfirm="removethebaseline4(scope.row.risAssId)"
                        title="删除后无法恢复，请确定是否删除？"
                        ><el-button slot="reference" type="text"
                          >删除</el-button
                        >
                      </el-popconfirm>
                    </div>
                  </template>
                </el-table-column>
              </el-table>
              <el-pagination
                background
                :current-page.sync="pageNum4"
                :page-sizes="pageSizes4"
                layout="total,prev, pager, next,sizes"
                :total="total"
                @size-change="changeSize4"
                @current-change="changePage4"
              ></el-pagination>
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane label="检测范围" name="fourth1">
          <div id="queryTable" style="clear: both;">
            <div id="tableData">
              <el-table :data="tableData" style="width: 100%" border>
                <el-table-column
                  prop="refRangeResult"
                  label="检测名称"
                  width="120"
                  align="center"
                />
                <el-table-column
                  prop="refType"
                  label="指标类型"
                  width="120"
                  align="center"
                />
                <el-table-column
                  prop="downLimit"
                  label="下限阈值"
                  width="120"
                  align="center"
                />
                <el-table-column
                  prop="down"
                  label="下限"
                  width="120"
                  align="center"
                />
                <el-table-column prop="up" label="上限" align="center" />
                <el-table-column
                  prop="upLimit"
                  label="上限阈值"
                  align="center"
                />
                <el-table-column
                  prop="unitRemark"
                  label="单位"
                  width="120"
                  align="center"
                />
                <el-table-column label="操作" align="center" width="120">
                  <template slot-scope="scope">
                    <div>
                      <el-button type="text" @click="theecho5(scope.row.refId)"
                        >修改</el-button
                      >

                      <el-popconfirm
                        @onConfirm="removethebaseline5(scope.row.refId)"
                        title="删除后无法恢复，请确定是否删除？"
                        ><el-button slot="reference" type="text"
                          >删除</el-button
                        >
                      </el-popconfirm>
                    </div>
                  </template>
                </el-table-column>
              </el-table>
              <el-pagination
                background
                :current-page.sync="pageNum5"
                :page-sizes="pageSizes5"
                layout="total,prev, pager, next,sizes"
                :total="total"
                @size-change="changeSize5"
                @current-change="changePage5"
              ></el-pagination>
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane label="药品管理" name="fourth2">
          <div id="queryTable" style="clear: both;">
            <div id="tableData">
              <el-table :data="tableData" style="width: 100%" border>
                <el-table-column
                  prop="regulerName"
                  label="药品通用名称"
                  align="center"
                />
                <el-table-column
                  prop="regulerSpell"
                  label="通用名拼音码"
                  align="center"
                />
                <el-table-column
                  prop="regulerWb"
                  label="通用名五笔码"
                  align="center"
                />
                <el-table-column
                  prop="drugName"
                  label="药品名称 "
                  align="center"
                />
                <el-table-column
                  prop="spellCode"
                  label="药品名称拼音码 "
                  align="center"
                />
                <el-table-column
                  prop="wbCode"
                  label="药品名称五笔码 "
                  align="center"
                />
                <el-table-column prop="specs" label="单位" align="center" />
                <el-table-column
                  prop="drugGrade"
                  label="药品等级"
                  align="center"
                />
                <el-table-column
                  prop="splitType"
                  label="拆分类型"
                  align="center"
                />
                <el-table-column label="操作" align="center" width="120">
                  <template slot-scope="scope">
                    <div>
                      <el-button
                        type="text"
                        @click="theecho6(scope.row.uuid, scope.row.drugCode)"
                        >修改</el-button
                      >
                      <el-popconfirm
                        @onConfirm="removethebaseline6(scope.row.uuid)"
                        title="删除后无法恢复，请确定是否删除？"
                        ><el-button slot="reference" type="text"
                          >删除</el-button
                        >
                      </el-popconfirm>
                    </div>
                  </template>
                </el-table-column>
              </el-table>
              <el-pagination
                background
                :current-page.sync="pageNum6"
                :page-sizes="pageSizes6"
                layout="total,prev, pager, next,sizes"
                :total="total"
                @size-change="changeSize6"
                @current-change="changePage6"
              ></el-pagination>
            </div>
          </div>
        </el-tab-pane>
      </el-tabs>

     <!--  <div v-if="buttontodisplay1">
        <el-button
          class="thesorting"
          @click="handleCreateForm('centerDialogVisible1')"
          >新增</el-button
        >
      </div>
      <div v-if="buttontodisplay2">
        <el-button
          class="thesorting"
          @click="handleCreateForm('centerDialogVisible2')"
          >新增</el-button
        >
      </div>
      <div v-if="buttontodisplay3">
       <el-button
          class="thesorting"
          @click="handleCreateForm('centerDialogVisible3')"
          >新增</el-button
        >
      </div> -->
     <div>
       <el-button
          class="thesorting"
          @click="handleCreate"
          >新增</el-button
        >
      </div> 
      <!-- <div v-if="buttontodisplay5">
       <el-button
          class="thesorting"
          @click="handleCreateForm('centerDialogVisible5')"
          >新增</el-button
        >
      </div>
      <div v-if="buttontodisplay6">
        <el-button
          class="thesorting"
          @click="handleCreateForm('centerDialogVisible6')"
          >新增</el-button
        >
      </div> -->
      <div>
        <div>
         <!--添加紧急处理弹窗----------------------------------------------->
          <el-dialog
            title="新建紧急处理"
            :visible.sync="centerDialogVisible1"
            width="43%"
            @close="closeDialog('sharedForm')"
            center
          >
            <el-row :gutter="72">
              <el-form
                :rules="rules"
                ref="sharedForm"
                :model="sharedForm"
                size="mini"
                label-width="78px"
              >
                <el-col :span="24">
                  <el-form-item label="名称" prop="emeTreName">
                    <el-input
                      v-model="sharedForm.emeTreName"
                      placeholder="请输入名称"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="描述" prop="emeTreDescribe">
                    <el-input
                      v-model="sharedForm.emeTreDescribe"
                      placeholder="请输入描述"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="状态" prop="splitType">
                    <el-select
                      v-model="sharedForm.emeTreState"
                      placeholder="请输入状态"
                      clearable
                      :style="{ width: '100%' }"
                    >
                      <el-option
                        v-for="item in options3"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                        :style="{ width: '100%' }"
                      >
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-form>
            </el-row>
            <span slot="footer" class="dialog-footer">
              <el-button @click="centerDialogVisible1 = false">取 消</el-button>
              <el-button
                type="primary"
                @click="centerDialogVisibles1('sharedForm')"
                >确 定</el-button
              >
            </span>
          </el-dialog>
        </div>
        <div> 
          <!--添加运动处方弹窗----------------------------------------------->
          <el-dialog
            title="新建运动处方"
            :visible.sync="centerDialogVisible2"
            width="43%"
            @close="closeDialog('sharedForm')"
            center
          >
            <el-row :gutter="72">
              <el-form
                :rules="rules"
                ref="sharedForm"
                :model="sharedForm"
                size="mini"
                label-width="78px"
              >
                <el-col :span="24">
                  <el-form-item label="名称" prop="exePreName">
                    <el-input
                      v-model="sharedForm.exePreName"
                      placeholder="请输入名称"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="描述" prop="exePreDescribe">
                    <el-input
                      v-model="sharedForm.exePreDescribe"
                      placeholder="请输入描述"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="状态" prop="splitType">
                    <el-select
                      v-model="sharedForm.exePreState"
                      placeholder="请输入状态"
                      clearable
                      :style="{ width: '100%' }"
                    >
                      <el-option
                        v-for="item in options3"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                        :style="{ width: '100%' }"
                      >
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-form>
            </el-row>
            <span slot="footer" class="dialog-footer">
              <el-button @click="centerDialogVisible2 = false">取 消</el-button>
              <el-button
                type="primary"
                @click="centerDialogVisibles2('sharedForm')"
                >确 定</el-button
              >
            </span>
          </el-dialog>
        </div>
        <div>
          <!--添加饮食处方弹窗----------------------------------------------->
          <el-dialog
            title="新建饮食处方"
            :visible.sync="centerDialogVisible3"
            width="43%"
            @close="closeDialog('sharedForm')"
            center
          >
            <el-row :gutter="72">
              <el-form
                :rules="rules"
                ref="sharedForm"
                :model="sharedForm"
                size="mini"
                label-width="78px"
              >
                <el-col :span="24">
                  <el-form-item label="名称" prop="diePreName">
                    <el-input
                      v-model="sharedForm.diePreName"
                      placeholder="请输入名称"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="描述" prop="diePreDescribe">
                    <el-input
                      v-model="sharedForm.diePreDescribe"
                      placeholder="请输入描述"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="状态" prop="splitType">
                    <el-select
                      v-model="sharedForm.diePreState"
                      placeholder="请输入状态"
                      clearable
                      :style="{ width: '100%' }"
                    >
                      <el-option
                        v-for="item in options3"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                        :style="{ width: '100%' }"
                      >
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-form>
            </el-row>
            <span slot="footer" class="dialog-footer">
              <el-button @click="centerDialogVisible3 = false">取 消</el-button>
              <el-button
                type="primary"
                @click="centerDialogVisibles3('sharedForm')"
                >确 定</el-button
              >
            </span>
          </el-dialog>
        </div>
        <div>
          <!--添加风险评估弹窗----------------------------------------------->
         <!--  <el-dialog
            title="新建风险评估"
            :visible.sync="centerDialogVisible4"
            width="43%"
            @close="closeDialog('sharedForm')"
            center
          >
            <el-row :gutter="72">
              <el-form
                :rules="rules"
                ref="sharedForm"
                :model="sharedForm"
                size="mini"
                label-width="78px"
              >
                <el-col :span="24">
                  <el-form-item label="名称" prop="risAssName">
                    <el-input
                      v-model="sharedForm.risAssName"
                      placeholder="请输入名称"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="评估来源" prop="risAssSources">
                    <el-input
                      v-model="sharedForm.risAssSources"
                      placeholder="请输入描述"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="状态" prop="splitType">
                    <el-select
                      v-model="sharedForm.risAssState"
                      placeholder="请输入状态"
                      clearable
                      :style="{ width: '100%' }"
                    >
                      <el-option
                        v-for="item in options3"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                        :style="{ width: '100%' }"
                      >
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-form>
            </el-row>
            <span slot="footer" class="dialog-footer">
              <el-button @click="centerDialogVisible4 = false">取 消</el-button>
              <el-button
                type="primary"
                @click="centerDialogVisibles4('sharedForm')"
                >确 定</el-button
              >
            </span>
          </el-dialog>
        </div>
        <div> -->
          <!--添加检测范围弹窗----------------------------------------------->
          <el-dialog
            title="新建检测范围"
            :visible.sync="centerDialogVisible5"
            width="43%"
            @close="closeDialog('sharedForm')"
            center
          >
            <el-row :gutter="72">
              <el-form
                :rules="rules"
                ref="sharedForm"
                :model="sharedForm"
                size="mini"
                label-width="78px"
              >
                <el-col :span="24">
                  <el-form-item label="名称" prop="refRangeResult">
                    <el-input
                      v-model="sharedForm.refRangeResult"
                      placeholder="请输入名称"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="指标" prop="refType">
                    <el-input
                      v-model="sharedForm.refType"
                      placeholder="请输入指标"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item
                    label="下限阈值"
                    prop="downLimit"
                    label-width="110px"
                  >
                    <el-input
                      v-model="sharedForm.downLimit"
                      placeholder="请输入下限阈值"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="下限" prop="down">
                    <el-input
                      v-model="sharedForm.down"
                      placeholder="请输入下限"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="上限阈值" prop="up" label-width="110px">
                    <el-input
                      v-model="sharedForm.up"
                      placeholder="请输入上限阈值"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="上限" prop="upLimit">
                    <el-input
                      v-model="sharedForm.upLimit"
                      placeholder="请输入上限"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="单位" prop="unitRemark">
                    <el-input
                      v-model="sharedForm.unitRemark"
                      oninput="value=value.replace(/[^\d]/g,'')"
                      placeholder="请输入单位"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-form>
            </el-row>
            <span slot="footer" class="dialog-footer">
              <el-button @click="centerDialogVisible5 = false">取 消</el-button>
              <el-button
                type="primary"
                @click="centerDialogVisibles5('sharedForm')"
                >确 定</el-button
              >
            </span>
          </el-dialog>
        </div>
        <div>
          <!--添加药品管理弹窗----------------------------------------------->
          <el-dialog
            title="新建药品管理"
            :visible.sync="centerDialogVisible6"
            width="43%"
            @close="closeDialog('sharedForm')"
            center
          >
            <el-row :gutter="72">
              <el-form
                :rules="rules"
                ref="sharedForm"
                :model="sharedForm"
                size="mini"
                label-width="78px"
              >
                <el-col :span="24">
                  <el-form-item label="药品名称" prop="drugName">
                    <el-input
                      @change="hinesecharacter1"
                      v-model="sharedForm.drugName"
                      placeholder="请输入药品名称"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <!-- <el-col :span="20">
                  <el-form-item
                    label="药品名称拼音码"
                    prop="groupName"
                    label-width="110px"
                  >
                    <el-input
                      v-model="sharedForm.spellCode"
                      placeholder="请输入请输入"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="20">
                  <el-form-item
                    label="药品名称五笔码"
                    prop="groupName"
                    label-width="110px"
                  >
                    <el-input
                      v-model="sharedForm.wbCode"
                      placeholder="请输入请输入"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col> -->
                <el-col :span="24">
                  <el-form-item
                    label="药品通用名"
                    prop="regulerName"
                    label-width="92px"
                  >
                    <el-input
                      v-model="sharedForm.regulerName"
                      @change="hinesecharacter2"
                      placeholder="请输入药品通用名"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <!-- <el-col :span="20">
                  <el-form-item
                    label="通用名拼音码"
                    prop="groupName"
                    label-width="98px"
                  >
                    <el-input
                      v-model="sharedForm.regulerSpell"
                      placeholder="请输入请输入"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="20">
                  <el-form-item
                    label="通用名五笔码"
                    prop="groupName"
                    label-width="98px"
                  >
                    <el-input
                      v-model="sharedForm.regulerWb"
                      placeholder="请输入请输入"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col> -->
                <el-col :span="24">
                  <el-form-item label="单位" prop="specs">
                    <el-input
                      v-model="sharedForm.specs"
                      placeholder="请输入单位"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>

                <el-col :span="24">
                  <el-form-item label="拆分类型" prop="splitType">
                    <el-select
                      v-model="sharedForm.splitType"
                      placeholder="请选择拆分类型"
                      clearable
                      :style="{ width: '100%' }"
                    >
                      <el-option
                        v-for="item in options1"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                        :style="{ width: '100%' }"
                      >
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>

                <el-col :span="24">
                  <el-form-item label="药品等级" prop="drugGrade">
                    <el-select
                      v-model="sharedForm.drugGrade"
                      placeholder="请选择药品等级"
                      clearable
                      :style="{ width: '100%' }"
                    >
                      <el-option
                        v-for="item in options2"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                        :style="{ width: '100%' }"
                      >
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-form>
            </el-row>
            <span slot="footer" class="dialog-footer">
              <el-button @click="centerDialogVisible6 = false">取 消</el-button>
              <el-button
                type="primary"
                @click="centerDialogVisibles6('sharedForm')"
                >确 定</el-button
              >
            </span>
          </el-dialog>
        </div>
        <div>
          <!--修改紧急处理名称----------------------------------------------->
          <el-dialog
            title="修改紧急处理"
            :visible.sync="modifythepopupwindow1"
            width="43%"
            @close="closeDialog('sharedForm')"
            center
          >
            <el-row :gutter="72">
              <el-form
                ref="sharedForm"
                :model="sharedForm"
                size="mini"
                label-width="78px"
              >
                <el-col :span="24">
                  <el-form-item label="名称" prop="groupName">
                    <el-input
                      v-model="sharedForm.emeTreName"
                      placeholder="请输入名称"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="描述" prop="groupName">
                    <el-input
                      v-model="sharedForm.emeTreDescribe"
                      placeholder="请输入描述"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="状态" prop="splitType">
                    <el-select
                      v-model="sharedForm.emeTreState"
                      placeholder="请输入状态"
                      clearable
                      :style="{ width: '100%' }"
                    >
                      <el-option
                        v-for="item in options3"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                        :style="{ width: '100%' }"
                      >
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-form>
            </el-row>
            <span slot="footer" class="dialog-footer">
              <el-button @click="modifythepopupwindow1 = false"
                >取 消</el-button
              >
              <el-button type="primary" @click="updatecenterDialogVisibles1"
                >确 定</el-button
              >
            </span>
          </el-dialog>
        </div>
        <div>
          <!--修改运动处方弹窗----------------------------------------------->
          <el-dialog
            title="修改运动处方"
            :visible.sync="modifythepopupwindow2"
            width="43%"
            @close="closeDialog('sharedForm')"
            center
          >
            <el-row :gutter="72">
              <el-form
                ref="sharedForm"
                :model="sharedForm"
                size="mini"
                label-width="78px"
              >
                <el-col :span="24">
                  <el-form-item label="名称" prop="groupName">
                    <el-input
                      v-model="sharedForm.exePreName"
                      placeholder="请输入名称"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="描述" prop="groupName">
                    <el-input
                      v-model="sharedForm.exePreDescribe"
                      placeholder="请输入描述"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="状态" prop="splitType">
                    <el-select
                      v-model="sharedForm.exePreState"
                      placeholder="请输入状态"
                      clearable
                      :style="{ width: '100%' }"
                    >
                      <el-option
                        v-for="item in options3"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                        :style="{ width: '100%' }"
                      >
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-form>
            </el-row>
            <span slot="footer" class="dialog-footer">
              <el-button @click="modifythepopupwindow2 = false"
                >取 消</el-button
              >
              <el-button type="primary" @click="updatecenterDialogVisibles2"
                >确 定</el-button
              >
            </span>
          </el-dialog>
        </div>
        <div>
          <!--修改饮食处方弹窗----------------------------------------------->
          <el-dialog
            title="修改饮食处方"
            :visible.sync="modifythepopupwindow3"
            width="43%"
            @close="closeDialog('sharedForm')"
            center
          >
            <el-row :gutter="72">
              <el-form
                ref="sharedForm"
                :model="sharedForm"
                size="mini"
                label-width="78px"
              >
                <el-col :span="24">
                  <el-form-item label="名称" prop="groupName">
                    <el-input
                      v-model="sharedForm.diePreName"
                      placeholder="请输入名称"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="描述" prop="groupName">
                    <el-input
                      v-model="sharedForm.diePreDescribe"
                      placeholder="请输入描述"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="状态" prop="splitType">
                    <el-select
                      v-model="sharedForm.diePreState"
                      placeholder="请输入状态"
                      clearable
                      :style="{ width: '100%' }"
                    >
                      <el-option
                        v-for="item in options3"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                        :style="{ width: '100%' }"
                      >
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-form>
            </el-row>
            <span slot="footer" class="dialog-footer">
              <el-button @click="modifythepopupwindow3 = false"
                >取 消</el-button
              >
              <el-button type="primary" @click="updatecenterDialogVisibles3"
                >确 定</el-button
              >
            </span>
          </el-dialog>
        </div>
        <div>
          <!--修改风险评估弹窗----------------------------------------------->
          <el-dialog
            title="修改风险评估"
            :visible.sync="modifythepopupwindow4"
            width="43%"
            @close="closeDialog('sharedForm')"
            center
          >
            <el-row :gutter="72">
              <el-form
                ref="sharedForm"
                :model="sharedForm"
                size="mini"
                label-width="78px"
              >
                <el-col :span="24">
                  <el-form-item label="名称" prop="groupName">
                    <el-input
                      v-model="sharedForm.risAssName"
                      placeholder="请输入名称"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="评估来源" prop="groupName">
                    <el-input
                      v-model="sharedForm.risAssSources"
                      placeholder="请输入描述"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="状态" prop="splitType">
                    <el-select
                      v-model="sharedForm.risAssState"
                      placeholder="请输入状态"
                      clearable
                      :style="{ width: '100%' }"
                    >
                      <el-option
                        v-for="item in options3"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                        :style="{ width: '100%' }"
                      >
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-form>
            </el-row>
            <span slot="footer" class="dialog-footer">
              <el-button @click="modifythepopupwindow4 = false"
                >取 消</el-button
              >
              <el-button type="primary" @click="updatecenterDialogVisibles4"
                >确 定</el-button
              >
            </span>
          </el-dialog>
        </div>
        <div>
          <!--修改检测范围弹窗----------------------------------------------->
          <el-dialog
            title="修改检测范围"
            :visible.sync="modifythepopupwindow5"
            width="43%"
            @close="closeDialog('sharedForm')"
            center
          >
            <el-row :gutter="72">
              <el-form
                ref="sharedForm"
                :model="sharedForm"
                size="mini"
                label-width="78px"
              >
                <el-col :span="24">
                  <el-form-item label="名称" prop="groupName">
                    <el-input
                      v-model="sharedForm.refRangeResult"
                      placeholder="请输入名称"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="指标" prop="groupName">
                    <el-input
                      v-model="sharedForm.refType"
                      placeholder="请输入指标"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item
                    label="下限阈值"
                    prop="groupName"
                    label-width="98px"
                  >
                    <el-input
                      v-model="sharedForm.downLimit"
                      placeholder="请输入下限阈值"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="下限" prop="groupName">
                    <el-input
                      v-model="sharedForm.down"
                      placeholder="请输入下限"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item
                    label="上限阈值"
                    prop="groupName"
                    label-width="98px"
                  >
                    <el-input
                      v-model="sharedForm.up"
                      placeholder="请输入上限阈值"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="上限" prop="groupName">
                    <el-input
                      v-model="sharedForm.upLimit"
                      placeholder="请输入上限"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="24">
                  <el-form-item label="单位" prop="groupName">
                    <el-input
                      v-model="sharedForm.unitRemark"
                      placeholder="请输入单位"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
              </el-form>
            </el-row>
            <span slot="footer" class="dialog-footer">
              <el-button @click="modifythepopupwindow5 = false"
                >取 消</el-button
              >
              <el-button type="primary" @click="updatecenterDialogVisibles5"
                >确 定</el-button
              >
            </span>
          </el-dialog>
        </div>
        <div>
          <!--修改药品管理弹窗----------------------------------------------->
          <el-dialog
            title="修改药品管理"
            :visible.sync="modifythepopupwindow6"
            width="43%"
            @close="closeDialog('sharedForm')"
            center
          >
            <el-row :gutter="72">
              <el-form
                ref="sharedForm"
                :model="sharedForm"
                size="mini"
                label-width="78px"
              >
                <el-col :span="24">
                  <el-form-item label="药品名称" prop="groupName">
                    <el-input
                      v-model="sharedForm.drugName"
                      @change="hinesecharacter1"
                      placeholder="请输入药品名称"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <!-- <el-col :span="20">
                  <el-form-item
                    label="药品名称拼音码"
                    prop="groupName"
                    label-width="110px"
                  >
                    <el-input
                      v-model="sharedForm.spellCode"
                      placeholder="请输入请输入"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="20">
                  <el-form-item
                    label="药品名称五笔码"
                    prop="groupName"
                    label-width="110px"
                  >
                    <el-input
                      v-model="sharedForm.wbCode"
                      placeholder="请输入请输入"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col> -->
                <el-col :span="24">
                  <el-form-item
                    label="药品通用名"
                    prop="groupName"
                    label-width="92px"
                  >
                    <el-input
                      v-model="sharedForm.regulerName"
                      @change="hinesecharacter2"
                      placeholder="请输入药品通用名"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <!-- <el-col :span="20">
                  <el-form-item
                    label="通用名拼音码"
                    prop="groupName"
                    label-width="98px"
                  >
                    <el-input
                      v-model="sharedForm.regulerSpell"
                      placeholder="请输入请输入"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>
                <el-col :span="20">
                  <el-form-item
                    label="通用名五笔码"
                    prop="groupName"
                    label-width="98px"
                  >
                    <el-input
                      v-model="sharedForm.regulerWb"
                      placeholder="请输入请输入"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col> -->
                <el-col :span="24">
                  <el-form-item label="单位" prop="groupName">
                    <el-input
                      v-model="sharedForm.specs"
                      placeholder="请输入单位"
                      clearable
                      :style="{ width: '100%' }"
                    ></el-input>
                  </el-form-item>
                </el-col>

                <el-col :span="24">
                  <el-form-item label="拆分类型" prop="field101">
                    <el-select
                      v-model="sharedForm.splitType"
                      placeholder="请选择拆分类型"
                      clearable
                      :style="{ width: '100%' }"
                    >
                      <el-option
                        v-for="item in options1"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                        :style="{ width: '100%' }"
                      >
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>

                <el-col :span="24">
                  <el-form-item label="药品等级" prop="field101">
                    <el-select
                      v-model="sharedForm.drugGrade"
                      placeholder="请选择药品等级"
                      clearable
                      :style="{ width: '100%' }"
                    >
                      <el-option
                        v-for="item in options2"
                        :key="item.value"
                        :label="item.label"
                        :value="item.value"
                        :style="{ width: '100%' }"
                      >
                      </el-option>
                    </el-select>
                  </el-form-item>
                </el-col>
              </el-form>
            </el-row>
            <span slot="footer" class="dialog-footer">
              <el-button @click="modifythepopupwindow6 = false"
                >取 消</el-button
              >
              <el-button type="primary" @click="updatecenterDialogVisibles6"
                >确 定</el-button
              >
            </span>
          </el-dialog>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { makePy, makeWb } from "@/components/pinyinhewubi/wubiandpinyin"; //导入拼音和五笔
import { emergencytreatment } from "@/api/back-management/Associated_configuration"; //紧急处理显示
import { exerciseprescription } from "@/api/back-management/Associated_configuration"; //运动处方显示
import { dietprescription } from "@/api/back-management/Associated_configuration"; //饮食处方显示
import { theriskassessment } from "@/api/back-management/Associated_configuration"; //风险评估显示
import { detectionrange } from "@/api/back-management/Associated_configuration"; //检测范围显示
import { drugadministration } from "@/api/back-management/Associated_configuration"; //药品管理显示
import { deleteemergencytreatment } from "@/api/back-management/Associated_configuration"; //删除紧急处理
import { deleteexerciseprescription } from "@/api/back-management/Associated_configuration"; //删除运动处方
import { deletedietprescription } from "@/api/back-management/Associated_configuration"; //删除饮食处方
import { deletetheriskassessment } from "@/api/back-management/Associated_configuration"; //删除风险评估
import { deletedetectionrange } from "@/api/back-management/Associated_configuration"; //删除检测范围
import { deletedrugadministration } from "@/api/back-management/Associated_configuration"; //删除药品管理
import { newemergencytreatment } from "@/api/back-management/Associated_configuration"; //新增紧急处理
import { newexerciseprescription } from "@/api/back-management/Associated_configuration"; //新增运动处方
import { newdietprescription } from "@/api/back-management/Associated_configuration"; //新增饮食处方
import { newtheriskassessment } from "@/api/back-management/Associated_configuration"; //新增风险评估
import { newdetectionrange } from "@/api/back-management/Associated_configuration"; //新增检测范围
import { newdrugadministration } from "@/api/back-management/Associated_configuration"; //新增药品管理
import { theechoexerciseprescription } from "@/api/back-management/Associated_configuration"; //运动处方回显
import { theechoemergencytreatment } from "@/api/back-management/Associated_configuration"; //紧急处理回显
import { theechodietprescription } from "@/api/back-management/Associated_configuration"; //饮食处方回显
import { theechotheriskassessment } from "@/api/back-management/Associated_configuration"; //风险评估回显
import { theechodetectionrange } from "@/api/back-management/Associated_configuration"; //检测范围回显
import { theechodrugadministration } from "@/api/back-management/Associated_configuration"; //药品管理回显
import { updateexerciseprescription } from "@/api/back-management/Associated_configuration"; //运动处方修改
import { updateemergencytreatment } from "@/api/back-management/Associated_configuration"; //紧急处理修改
import { updatedietprescription } from "@/api/back-management/Associated_configuration"; //饮食处方修改
import { updatetheriskassessment } from "@/api/back-management/Associated_configuration"; //风险评估修改
import { updatedetectionrange } from "@/api/back-management/Associated_configuration"; //检测范围修改
import { updatedrugadministration } from "@/api/back-management/Associated_configuration"; //药品管理修改
import follow_up_questionnaire from "@/views/back-management/follow_up_questionnaire";
export default {
  // components: {"follow-up-questionnaire": follow_up_questionnaire, //用户管理件
  // },
  props: [],
  data() {
    return {
      tableData: [],
      options1: [
        {
          value: "0",
          label: "可拆包装单位"
        },
        {
          value: "1",
          label: "不能拆包装单位"
        }
      ],
      aaa:"紧急处理",
      options2: [
        {
          value: "01",
          label: "甲类"
        },
        {
          value: "02",
          label: "乙类"
        },
        {
          value: "03",
          label: "丙类"
        }
      ],
      options3: [
        {
          value: "1",
          label: "在用"
        },
        {
          value: "2",
          label: "停用"
        }
      ],

      srkdz1: "",
      srkdz2: "",
      drugCode: "",
      splitType: "",
      drugGrade: "",
      exePreId: "",
      druManId: "",
      emeTreId: "",
      risAssId: "",
      detRanId: "",
      druManId: "",
      exePreName: "", //运动处方名称
      exePreDescribe: "", //运动处方描述

      total: 0,
      // 默认显示第几页
      pageNum1: 1,
      pageNum2: 1,
      pageNum3: 1,
      pageNum4: 1,
      pageNum5: 1,
      pageNum6: 1,

      pageSize1: 10,
      pageSize2: 10,
      pageSize3: 10,
      pageSize4: 10,
      pageSize5: 10,
      pageSize6: 10,
      // 总条数，根据接口获取数据长度(注意：这里不能为空)
      // 个数选择器（可修改）
      pageSizes1: [10, 20, 50],
      pageSizes2: [10, 20, 50],
      pageSizes3: [10, 20, 50],
      pageSizes4: [10, 20, 50],
      pageSizes5: [10, 20, 50],
      pageSizes6: [10, 20, 50],
      exePreState: "",
      sharedForm: {
        emeTreName: "",
        emeTreDescribe: "",
        emeTreState: "1",
        exePreName: "",
        exePreDescribe: "",
        exePreState: "1",
        diePreName: "",
        diePreDescribe: "",
        diePreState: "1",
        risAssName: "",
        risAssSources: "",
        risAssState: "1",
        refRangeResult: "",
        refType: "",
        downLimit: "",
        down: "",
        upLimit: "",
        up: "",
        unitRemark: "",
        regulerName: "",
        drugName: "",
        drugGrade: "",
        splitType: "",
        specs: "",
        spellCode: "",
        wbCode: "",
        regulerSpell: "",
        regulerWb: ""
      },
      refId: "",
      uuid: "",
      centerDialogVisible1: false, //添加紧急处理
      centerDialogVisible2: false, //添加运动处方
      centerDialogVisible3: false, //添加饮食处方
     // centerDialogVisible4: false, //添加风险评估
      centerDialogVisible5: false, //添加检测范围
      centerDialogVisible6: false, //添加药品管理
      buttontodisplay1: true,
      buttontodisplay2: false,
      buttontodisplay3: false,
      buttontodisplay4: false,
      buttontodisplay5: false,
      buttontodisplay6: false,
      modifythepopupwindow1: false,
      modifythepopupwindow2: false,
      modifythepopupwindow3: false,
      modifythepopupwindow4: false,
      modifythepopupwindow5: false,
      modifythepopupwindow6: false,
     // activeName: "first", //页面初始化显示的
      activeName: "", //页面初始化显示的
      
      rules: {
        emeTreName: [
          { required: true, message: "请输入名称", trigger: "change" }
        ],
        emeTreDescribe: [
          { required: true, message: "请输入描述", trigger: "change" }
        ],

        // emeTreState: [
        //   { required: true, message: "请输入状态", trigger: "change" }
        // ],
        exePreName: [
          { required: true, message: "请输入名称", trigger: "change" }
        ],
        exePreDescribe: [
          { required: true, message: "请输入描述", trigger: "change" }
        ],
        // exePreState: [
        //   { required: true, message: "请输入状态", trigger: "change" }
        // ],
        diePreName: [
          { required: true, message: "请输入名称", trigger: "change" }
        ],
        diePreDescribe: [
          { required: true, message: "请输入描述", trigger: "change" }
        ],
        // diePreState: [
        //   { required: true, message: "请输入状态", trigger: "change" }
        // ],
        risAssName: [
          { required: true, message: "请输入名称", trigger: "change" }
        ],
        risAssSources: [
          { required: true, message: "请输入描述", trigger: "change" }
        ],
        // risAssState: [
        //   { required: true, message: "请输入状态", trigger: "change" }
        // ],
        refRangeResult: [
          { required: true, message: "请输入名称", trigger: "change" }
        ],
        refType: [{ required: true, message: "请输入指标", trigger: "change" }],
        downLimit: [
          { required: true, message: "请输入下限阈值", trigger: "change" }
        ],
        down: [{ required: true, message: "请输入下限", trigger: "change" }],
        up: [{ required: true, message: "请输入上限阈值", trigger: "change" }],
        upLimit: [{ required: true, message: "请输入上限", trigger: "change" }],
        unitRemark: [
          { required: true, message: "请输入单位", trigger: "change" }
        ],
        drugName: [
          { required: true, message: "请药品名称", trigger: "change" }
        ],
        regulerName: [
          { required: true, message: "请药品通用名", trigger: "change" }
        ],
        specs: [{ required: true, message: "请输入单位", trigger: "change" }],
        // splitType: [
        //   { required: true, message: "请输入拆分类型", trigger: "change" }
        // ],
        drugGrade: [
          { required: true, message: "请输入药品等级", trigger: "change" }
        ]
      }
    };
  },
  computed: {},
  created() {},
  mounted() {
    
  
    
    
    this.activeName=sessionStorage.getItem("fourth");
   
    if(this.activeName=="fourth"){
       console.log(this.activeName,"this.activeName")
      this.initSelectCategorys4();
      this.aaa="风险评估"
    }else {
      this.initSelectCategorys2();
    }
   
    
    

  },
  methods: {
    calStar1(curr) {
      let pageNum1 = this.pageNum1;
      pageNum1 = (curr - 1) * this.pageSize1;
      return pageNum1;
    },
    calStar2(curr) {
      let pageNum2 = this.pageNum2;
      pageNum2 = (curr - 1) * this.pageSize2;
      return pageNum2;
    },
    calStar3(curr) {
      let pageNum3 = this.pageNum3;
      pageNum3 = (curr - 1) * this.pageSize3;
      return pageNum3;
    },
    calStar4(curr) {
      let pageNum4 = this.pageNum4;
      pageNum4 = (curr - 1) * this.pageSize4;
      return pageNum4;
    },
    calStar5(curr) {
      let pageNum5 = this.pageNum5;
      pageNum5 = (curr - 1) * this.pageSize5;
      return pageNum5;
    },
    calStar6(curr) {
      let pageNum6 = this.pageNum6;
      pageNum6 = (curr - 1) * this.pageSize6;
      return pageNum6;
    },
    //紧急处理
    changeSize1(size) {
      this.pageSize1 = size;
      this.pageNum1 = 1;
      this.initSelectCategorys2();
    },
    changePage1(page) {
      this.pageNum1 = page;
      this.initSelectCategorys2();
    },
    //运动处方
    changeSize2(size) {
      this.pageSize2 = size;
      this.pageNum2 = 1;
      this.initSelectCategorys1();
    },
    changePage2(page) {
      this.pageNum2 = page;
      this.initSelectCategorys1();
    },
    //饮食处方
    changeSize3(size) {
      this.pageSize3 = size;
      this.pageNum3 = 1;
      this.initSelectCategorys3();
    },
    changePage3(page) {
      this.pageNum3 = page;
      this.initSelectCategorys3();
    },
    //风险评估
    changeSize4(size) {
      this.pageSize4 = size;
      this.pageNum4 = 1;
      this.initSelectCategorys4();
    },
    changePage4(page) {
      this.pageNum4 = page;
      this.initSelectCategorys4();
    },
    //检测范围
    changeSize5(size) {
      this.pageSize5 = size;
      this.pageNum5 = 1;
      this.initSelectCategorys5();
    },
    changePage5(page) {
      this.pageNum5 = page;
      this.initSelectCategorys5();
    },
    //药品管理
    changeSize6(size) {
      this.pageSize6 = size;
      this.pageNum6 = 1;
      this.initSelectCategorys6();
    },
    changePage6(page) {
      this.pageNum6 = page;
      this.initSelectCategorys6();
    },
    handleClick(tab) {
      this.aaa=tab.label
      if (this.aaa == "紧急处理") {
        console.log(tab.label, "哈哈");
        this.initSelectCategorys2();
        this.buttontodisplay1 = true;
        this.buttontodisplay2 = false;
        this.buttontodisplay3 = false;
        this.buttontodisplay4 = false;
        this.buttontodisplay5 = false;
        this.buttontodisplay6 = false;
      } else if (this.aaa == "运动处方") {
        console.log(tab.label, "哈哈");
        this.initSelectCategorys1();
        this.buttontodisplay1 = false;
        this.buttontodisplay2 = true;
        this.buttontodisplay3 = false;
        this.buttontodisplay4 = false;
        this.buttontodisplay5 = false;
        this.buttontodisplay6 = false;
      } else if (this.aaa == "饮食处方") {
        console.log(tab.label, "哈哈");
        this.initSelectCategorys3();
        this.buttontodisplay1 = false;
        this.buttontodisplay2 = false;
        this.buttontodisplay3 = true;
        this.buttontodisplay4 = false;
        this.buttontodisplay5 = false;
        this.buttontodisplay6 = false;
      } else if (this.aaa == "风险评估") {
        console.log(tab.label, "哈哈");
        this.initSelectCategorys4();
        this.buttontodisplay1 = false;
        this.buttontodisplay2 = false;
        this.buttontodisplay3 = false;
        this.buttontodisplay4 = true;
        this.buttontodisplay5 = false;
        this.buttontodisplay6 = false;
      } else if (this.aaa == "检测范围") {
        console.log(tab.label, "哈哈");
        this.initSelectCategorys5();
        this.buttontodisplay1 = false;
        this.buttontodisplay2 = false;
        this.buttontodisplay3 = false;
        this.buttontodisplay4 = false;
        this.buttontodisplay5 = true;
        this.buttontodisplay6 = false;
      } else if (this.aaa == "药品管理") {
        console.log(tab.label, "哈哈");
        this.initSelectCategorys6();
        this.buttontodisplay1 = false;
        this.buttontodisplay2 = false;
        this.buttontodisplay3 = false;
        this.buttontodisplay4 = false;
        this.buttontodisplay5 = false;
        this.buttontodisplay6 = true;
      }
    },
    //添加弹窗
    handleCreateForm(name) {
      if (name == "centerDialogVisible1") {
        this.centerDialogVisible1 = true;
      } else if (name == "centerDialogVisible2") {
        this.centerDialogVisible2 = true;
      } else if (name == "centerDialogVisible3") {
        this.centerDialogVisible3 = true;
      } else if (name == "centerDialogVisible5") {
        this.centerDialogVisible5 = true;
      } else if (name == "centerDialogVisible6") {
        this.centerDialogVisible6 = true;
      }
    },
    handleCreate(){
      console.log(this.aaa,"this.aaa")
     if (this.aaa == "紧急处理") {
       this.centerDialogVisible1=true //添加紧急处理
     } else if (this.aaa == "运动处方") {
       this.centerDialogVisible2=true //添加运动处方
     } else if (this.aaa == "饮食处方") {
        this.centerDialogVisible3=true //添加饮食处方
    } else if (this.aaa == "风险评估") {
      
      this.$router.push({
        path: "Association_configuration_form",
        query: {
          judgeStatus: "add",
        },
      });
     } else if (this.aaa == "检测范围") {
        this.centerDialogVisible5=true //添加检测范围
        
      } else if (this.aaa == "药品管理") {
        this.centerDialogVisible6=true //添加药品管理
      }
      
    },
    //关闭弹窗
    closeDialog(name) {
      this.$refs[name].resetFields();
      // if (name == "sharedForm") {
      //   this.centerDialogVisible = false;
      //   // this.sharedForm.emeTreName = "";
      //   // this.sharedForm.emeTreDescribe = "";
      //   // this.sharedForm.emeTreState = "";
      // }
    },
    //紧急处理回显
    theecho1(emeTreId) {
      this.modifythepopupwindow1 = true;
      this.emeTreId = emeTreId;
      let params = {
        emeTreId: emeTreId
      };
      theechoemergencytreatment(params).then(res => {
        console.log(res.data.emeTreState, "res.data");
        if (res.data.emeTreState == "2") {
          this.sharedForm.emeTreState = "停用";
        } else if (res.data.emeTreState == "1") {
          this.sharedForm.emeTreState = "在用";
        }
        this.sharedForm.emeTreDescribe = res.data.emeTreDescribe;
        this.sharedForm.emeTreName = res.data.emeTreName;

        // this.sharedForm = res.data;
      });
    },
    //运动处方回显
    theecho2(exePreId) {
      this.modifythepopupwindow2 = true;
      this.exePreId = exePreId;
      let params = {
        exePreId: exePreId
      };
      theechoexerciseprescription(params).then(res => {
        if (res.data.exePreState == "2") {
          this.sharedForm.exePreState = "停用";
        } else if (res.data.exePreState == "1") {
          this.sharedForm.exePreState = "在用";
        }
        this.sharedForm.exePreDescribe = res.data.exePreDescribe;
        this.sharedForm.exePreName = res.data.exePreName;
      });
    },
    //饮食处方回显
    theecho3(diePreId) {
      this.modifythepopupwindow3 = true;
      this.diePreId = diePreId;
      let params = {
        diePreId: diePreId
      };
      theechodietprescription(params).then(res => {
        if (res.data.diePreState == "2") {
          this.sharedForm.diePreState = "停用";
        } else if (res.data.diePreState == "1") {
          this.sharedForm.diePreState = "在用";
        }
        this.sharedForm.diePreDescribe = res.data.diePreDescribe;
        this.sharedForm.diePreName = res.data.diePreName;
      });
    },
    //风险评估回显
    theecho4(risAssId) {
        this.$router.push({
        path: "Association_configuration_form_update",
        query: {
          judgeStatus: "add",
          risAssId:risAssId
        },
      });
      //this.modifythepopupwindow4 = true;
      this.risAssId = risAssId;
      // let params = {
      //   risAssId: risAssId
      // };
      // theechotheriskassessment(params).then(res => {
      //   if (res.data.risAssState == "2") {
      //     this.sharedForm.risAssState = "停用";
      //   } else if (res.data.risAssState == "1") {
      //     this.sharedForm.risAssState = "在用";
      //   }
      //   this.sharedForm.risAssSources = res.data.risAssSources;
      //   this.sharedForm.risAssName = res.data.risAssName;
      // });
    },
    //检测范围回显
    theecho5(refId) {
      this.modifythepopupwindow5 = true;
      this.refId = refId;
      let params = {
        refId: refId
      };
      theechodetectionrange(params).then(res => {
        this.sharedForm = res;
      });
    },
    //药品管理回显
    theecho6(uuid, drugCode) {
      this.modifythepopupwindow6 = true;
      this.uuid = uuid;
      this.drugCode = drugCode;
      let params = {
        uuid: uuid
      };
      theechodrugadministration(params).then(res => {
        this.sharedForm = res;
      });
    },
    //修改紧急处理回显数据
    updatecenterDialogVisibles1() {
      if (this.sharedForm.emeTreState == "停用") {
        this.sharedForm.emeTreState = "2";
      } else if (this.sharedForm.emeTreState == "在用") {
        this.sharedForm.emeTreState = "1";
      }
      let params = {
        emeTreId: this.emeTreId,
        emeTreName: this.sharedForm.emeTreName,
        emeTreDescribe: this.sharedForm.emeTreDescribe,
        emeTreState: this.sharedForm.emeTreState
      };
      updateemergencytreatment(params).then(res => {
        this.$message({
          message: "修改成功",
          type: "success"
        });
        this.modifythepopupwindow1 = false;
        this.initSelectCategorys2();
      });
    },
    //修改运动处方回显数据
    updatecenterDialogVisibles2() {
      if (this.sharedForm.exePreState == "停用") {
        this.sharedForm.exePreState = "2";
      } else if (this.sharedForm.exePreState == "在用") {
        this.sharedForm.exePreState = "1";
      }
      let params = {
        exePreId: this.exePreId,
        exePreName: this.sharedForm.exePreName,
        exePreDescribe: this.sharedForm.exePreDescribe,
        exePreState: this.sharedForm.exePreState
      };
      updateexerciseprescription(params).then(res => {
        this.$message({
          message: "修改成功",
          type: "success"
        });
        this.modifythepopupwindow2 = false;
        this.initSelectCategorys1();
      });
    },
    //修改饮食处方回显数据
    updatecenterDialogVisibles3() {
      if (this.sharedForm.diePreState == "停用") {
        this.sharedForm.diePreState = "2";
      } else if (this.sharedForm.diePreState == "在用") {
        this.sharedForm.diePreState = "1";
      }
      this.modifythepopupwindow3 = false;
      let params = {
        diePreId: this.diePreId,
        diePreName: this.sharedForm.diePreName,
        diePreDescribe: this.sharedForm.diePreDescribe,
        diePreState: this.sharedForm.diePreState
      };
      updatedietprescription(params).then(res => {
        this.$message({
          message: "修改成功",
          type: "success"
        });
        this.modifythepopupwindow3 = false;
        this.initSelectCategorys3();
      });
    },
    //修改风险评估回显数据
    updatecenterDialogVisibles4() {
      if (this.sharedForm.risAssState == "停用") {
        this.sharedForm.risAssState = "2";
      } else if (this.sharedForm.risAssState == "在用") {
        this.sharedForm.risAssState = "1";
      }
      this.modifythepopupwindow4 = false;
      let params = {
        risAssId: this.risAssId,
        risAssName: this.sharedForm.risAssName,
        risAssSources: this.sharedForm.risAssSources,
        risAssState: this.sharedForm.risAssState
      };
      updatetheriskassessment(params).then(res => {
        this.$message({
          message: "修改成功",
          type: "success"
        });
        this.modifythepopupwindow4 = false;
        this.initSelectCategorys4();
      });
    },
    //修改检测范围回显数据
    updatecenterDialogVisibles5() {
      this.modifythepopupwindow5 = false;
      let params = {
        refRangeResult: this.sharedForm.refRangeResult,
        refType: this.sharedForm.refType,
        downLimit: this.sharedForm.downLimit,
        down: this.sharedForm.down,
        up: this.sharedForm.up,
        upLimit: this.sharedForm.upLimit,
        unitRemark: this.sharedForm.unitRemark,
        refId: this.refId
      };
      updatedetectionrange(params).then(res => {
        this.$message({
          message: "修改成功",
          type: "success"
        });
        this.modifythepopupwindow5 = false;
        this.initSelectCategorys5();
      });
    },
    //修改药品管理回显数据
    updatecenterDialogVisibles6() {
      var add = /^[\u4e00-\u9fa5]{0,}$/;
      if (add.test(this.srkdz1) && add.test(this.srkdz2)) {
        let params = {
          regulerName: this.sharedForm.regulerName,
          spellCode: this.sharedForm.spellCode,
          wbCode: this.sharedForm.wbCode,
          regulerSpell: this.sharedForm.regulerSpell,
          regulerWb: this.sharedForm.regulerWb,
          drugName: this.sharedForm.drugName,
          regulerName: this.sharedForm.regulerName,
          drugType: "1",
          drugGrade: this.sharedForm.drugGrade,
          splitType: this.sharedForm.splitType,
          specs: this.sharedForm.specs,
          uuid: this.uuid,
          drugCode: this.drugCode
        };
        updatedrugadministration(params).then(res => {
          this.$message({
            message: "修改成功",
            type: "success"
          });
          this.modifythepopupwindow6 = false;
          this.initSelectCategorys6();
        });
      } else {
        this.$message({
          message: "药品名称和药品通用名请输入汉字",
          type: "warning"
        });
      }
    },

    //新增紧急处理
    centerDialogVisibles1(formName) {
   this.$refs[formName].validate(valid => {
        if (valid) {
         let params = {
        emeTreName: this.sharedForm.emeTreName,
        emeTreDescribe: this.sharedForm.emeTreDescribe,
        emeTreState: this.sharedForm.emeTreState
      };
      newemergencytreatment(params).then(res => {
        this.$message({
          message: "新增成功",
          type: "success"
        });
        this.centerDialogVisible1 = false;
        this.initSelectCategorys2();
      });
        } else {
          return false;
        }
      });

 },
    //新增运动处方
    centerDialogVisibles2(formName) {

  this.$refs[formName].validate(valid => {
        if (valid) {
       let params = {
        exePreName: this.sharedForm.exePreName,
        exePreDescribe: this.sharedForm.exePreDescribe,
        exePreState: this.sharedForm.exePreState
      };
      newexerciseprescription(params).then(res => {
        this.$message({
          message: "新增成功",
          type: "success"
        });
        this.centerDialogVisible2 = false;
        this.initSelectCategorys1();
      });
        } else {
          return false;
        }
      });



      
    },
    //新增饮食处方
    centerDialogVisibles3(formName) {
this.$refs[formName].validate(valid => {
        if (valid) {
       let params = {
        diePreName: this.sharedForm.diePreName,
        diePreDescribe: this.sharedForm.diePreDescribe,
        diePreState: this.sharedForm.diePreState
      };
      newdietprescription(params).then(res => {
        this.$message({
          message: "新增成功",
          type: "success"
        });
        this.centerDialogVisible3 = false;
        this.initSelectCategorys3();
      });
        } else {
          return false;
        }
      });

     
    },
    //新增风险评估
    centerDialogVisibles4(formName) {
this.$refs[formName].validate(valid => {
        if (valid) {
     let params = {
        risAssName: this.sharedForm.risAssName,
        risAssSources: this.sharedForm.risAssSources,
        risAssState: this.sharedForm.risAssState
      };
      newtheriskassessment(params).then(res => {
        this.$message({
          message: "新增成功",
          type: "success"
        });
       // this.centerDialogVisible4 = false;
        this.initSelectCategorys4();
      });
        } else {
          return false;
        }
      });


     
    },

    //新增检测范围
    centerDialogVisibles5(formName) {
      this.$refs[formName].validate(valid => {
        if (valid) {
          let params = {
            refRangeResult: this.sharedForm.refRangeResult,
            refType: this.sharedForm.refType,
            downLimit: this.sharedForm.downLimit,
            down: this.sharedForm.down,
            up: this.sharedForm.up,
            upLimit: this.sharedForm.upLimit,
            unitRemark: this.sharedForm.unitRemark
          };
          newdetectionrange(params).then(res => {
            this.$message({
              message: "新增成功",
              type: "success"
            });
            this.centerDialogVisible5 = false;
            this.initSelectCategorys5();
          });
        } else {
          return false;
        }
      });
    },
    hinesecharacter1: function(e) {
      console.log(e);
      this.srkdz1 = e;
      console.log(this.srkdz1, "this.srkdz");
      var add = /^[\u4e00-\u9fa5]{0,}$/;
      if (add.test(this.srkdz1)) {
        console.log("是中文");
      } else {
        // this.$message({
        //   message: "请输入汉字",
        //   type: "warning"
        // });
      }
    },
    hinesecharacter2: function(e) {
      console.log(e);
      this.srkdz2 = e;
      console.log(this.srkdz2, "this.srkdz");
      var add = /^[\u4e00-\u9fa5]{0,}$/;
      if (add.test(this.srkdz2)) {
        console.log("是中文");
      } else {
        // this.$message({
        //   message: "请输入汉字",
        //   type: "warning"
        // });
      }
    },
    //新增药品管理
    centerDialogVisibles6(formName) {
      this.$refs[formName].validate(valid => {
        if (valid) {
          var add = /^[\u4e00-\u9fa5]{0,}$/;
          if (add.test(this.srkdz1) && add.test(this.srkdz2)) {
            console.log(this.sharedForm.drugName, "this.sharedForm.drugName");
            this.sharedForm.spellCode = makePy(this.sharedForm.drugName);
            this.sharedForm.wbCode = makeWb(this.sharedForm.drugName);
            this.sharedForm.regulerSpell = makePy(this.sharedForm.regulerName);
            this.sharedForm.regulerWb = makeWb(this.sharedForm.regulerName);

            let params = {
              regulerName: this.sharedForm.regulerName,
              spellCode: this.sharedForm.spellCode,
              wbCode: this.sharedForm.wbCode,
              regulerSpell: this.sharedForm.regulerSpell,
              regulerWb: this.sharedForm.regulerWb,
              drugName: this.sharedForm.drugName,
              regulerName: this.sharedForm.regulerName,
              drugType: "1",
              drugGrade: this.sharedForm.drugGrade,
              splitType: this.sharedForm.splitType,
              specs: this.sharedForm.specs
            };
            newdrugadministration(params).then(res => {
              this.$message({
                message: "新增成功",
                type: "success"
              });
              this.centerDialogVisible6 = false;
              this.initSelectCategorys6();
            });
          } else {
            this.$message({
              message: "药品名称和药品通用名请输入汉字",
              type: "warning"
            });
          }
        } else {
          return false;
        }
      });
    },
    //运动处方显示
    initSelectCategorys1() {
      let params = {
        length: this.pageSize2,
        start: this.calStar2(this.pageNum2)
      };

      exerciseprescription(params).then(res => {
        this.tableData = res.data.data;
        this.total = res.data.total;

        this.tableData.forEach((item, index) => {
          console.log(typeof item.exePreState.toString(), "item.exePreState");
          switch (item.exePreState.toString()) {
            case "1":
              return (item.exePreState = "在用");
              break;
            case "2":
              return (item.exePreState = "停用");
              break;
          }
        });
      });
    },

    //紧急处理显示
    initSelectCategorys2() {
      let params = {
        length: this.pageSize1,
        start: this.calStar1(this.pageNum1)
      };
      emergencytreatment(params).then(res => {
        this.tableData = res.data.data;
        this.total = res.data.total;
        this.tableData.forEach((item, index) => {
          console.log(typeof item.emeTreState.toString(), "item.emeTreState");
          switch (item.emeTreState.toString()) {
            case "1":
              return (item.emeTreState = "在用");
              break;
            case "2":
              return (item.emeTreState = "停用");
              break;
          }
        });
      });
    },

    //饮食处方显示
    initSelectCategorys3() {
      let params = {
        length: this.pageSize3,
        start: this.calStar3(this.pageNum3)
      };
      dietprescription(params).then(res => {
        this.tableData = res.data.data;
        this.total = res.data.total;
        this.tableData.forEach((item, index) => {
          console.log(typeof item.diePreState.toString(), "item.diePreState");
          switch (item.diePreState.toString()) {
            case "1":
              return (item.diePreState = "在用");
              break;
            case "2":
              return (item.diePreState = "停用");
              break;
          }
        });
      });
    },

    //风险评估显示
    initSelectCategorys4() {
      let params = {
        length: this.pageSize4,
        start: this.calStar4(this.pageNum4)
      };
      theriskassessment(params).then(res => {
        this.tableData = res.data.data;
        this.total = res.data.total;
        this.tableData.forEach((item, index) => {
          console.log(typeof item.risAssState.toString(), "item.risAssState");
          switch (item.risAssState.toString()) {
            case "1":
              return (item.risAssState = "在用");
              break;
            case "2":
              return (item.risAssState = "停用");
              break;
          }
        });
      });
    },

    //检测范围显示
    initSelectCategorys5() {
      let params = {
        length: this.pageSize5,
        start: this.calStar5(this.pageNum5)
      };
      detectionrange(params).then(res => {
        this.tableData = res.data;
        this.total = res.total;
      });
    },

    //药品管理显示
    initSelectCategorys6() {
      let params = {
        length: this.pageSize6,
        start: this.calStar6(this.pageNum6)
      };
      drugadministration(params).then(res => {
        this.tableData = res.data;
        this.total = res.total;

        this.tableData.forEach((item, index) => {
          console.log(typeof item.drugGrade, "item.drugGrade");
          switch (item.drugGrade) {
            case "01":
              return (item.drugGrade = "甲类");
              break;
            case "02":
              return (item.drugGrade = "乙类");
              break;
            case "03":
              return (item.drugGrade = "丙类");
              break;
          }
        });
        this.tableData.forEach((item, index) => {
          console.log(typeof item.splitType, "item.splitType");
          switch (item.splitType) {
            case "0":
              return (item.splitType = "可拆包装单位");
              break;
            case "1":
              return (item.splitType = "不能拆包装单位");
              break;
          }
        });
      });
    },
    //删除运动处方
    removethebaseline1(exePreId) {
      let params = {
        exePreId: exePreId
      };
      deleteexerciseprescription(params).then(res => {
        this.$message({
          message: "删除成功",
          type: "success"
        });
        this.initSelectCategorys1();
      });
    },
    //删除紧急处理
    removethebaseline2(emeTreId) {
      let params = {
        emeTreId: emeTreId
      };
      deleteemergencytreatment(params).then(res => {
        this.$message({
          message: "删除成功",
          type: "success"
        });
        this.initSelectCategorys2();
      });
    },
    //删除饮食处方
    removethebaseline3(diePreId) {
      let params = {
        diePreId: diePreId
      };
      deletedietprescription(params).then(res => {
        this.$message({
          message: "删除成功",
          type: "success"
        });
        this.initSelectCategorys3();
      });
    },
    //删除风险评估
    removethebaseline4(risAssId) {
      let params = {
        risAssId: risAssId
      };
      deletetheriskassessment(params).then(res => {
        this.$message({
          message: "删除成功",
          type: "success"
        });
        this.initSelectCategorys4();
      });
    },
    //删除检测范围
    removethebaseline5(refId) {
      let params = {
        refId: refId
      };
      deletedetectionrange(params).then(res => {
        this.$message({
          message: "删除成功",
          type: "success"
        });
        this.initSelectCategorys5();
      });
    },
    //删除药品管理
    removethebaseline6(uuid) {
      let params = {
        drugCode: uuid
      };
      deletedrugadministration(params).then(res => {
        this.$message({
          message: "删除成功",
          type: "success"
        });
        this.initSelectCategorys6();
      });
    }
  }
};
</script>

<style lang="scss" scoped>
.tabs_panel {
  display: flex;
  margin-bottom: 30px;
  .tabs_items {
    font-size: 18px;
    font-weight: bold;
    color: #a1a8b3;
    margin-right: 40px;
    cursor: pointer;
    &.active_current {
      color: #4380ea;
    }
  }
}
.elementstyle {
  position: relative;
  margin-left: 20px;
  margin-right: 20px;
}

.thesorting {
  color: #fff;
  background: #4380ea;
  position: absolute;

  right: 30px;
  top: 10px;
}
.thesorting1 {
  color: #fff;
  background: #4380ea;
  position: absolute;
  right: 120px;

  top: 10px;
}
</style>









